{% extends "base_blank.volt" %}
{% block pageHeader %}
    {{ stylesheet_link("/assets/manage/css/tabstyle.css", false) }}
    {{ stylesheet_link("/libs/bootstrap-daterangepicker/daterangepicker.css", false) }}
{% endblock %}
{% block pageFooter%}
    {{ javascript_include("/libs/bootstrap-daterangepicker/moment.min.js", false) }}
    {{ javascript_include("/libs/bootstrap-daterangepicker/daterangepicker.js", false) }}
    {{ javascript_include("/assets/manage/js/bp/listInteract.js", false) }}
{% endblock %}

{% block content %}
<div class="panel panel-default">
            <div class="panel-body">
                <form class="form-inline" role="form" action="" method="get">
                   
                    <div class="form-group">
                        <div class="input-group">
                            <label class="input-group-addon" for="keyword">内容:</label>
                            <input class="form-control" type="text" name="content" id="content" value="{{ content }}" />
                            <input type="hidden" name="id" value="{{ id }}">
                        </div>  
                    </div>
                    <!-- <div class="form-group">
                        <div class="input-group">
                            <label class="input-group-addon" for="keyword">状态:</label>
                            <select name="state" class="form-control">
                            	<option value="-10000" {% if state == -10000 %} selected="selected" {% endif %}>全部</option>
                            	<option value="1" {% if state == 1 %} selected="selected" {% endif %}>正常</option>
                            	<option value="-1" {% if state == -1 %} selected="selected" {% endif %}>删除</option>
                            </select>
                        </div>  
                    </div> -->
                    <div class="form-group">
                        <div class="input-group">
                        	<label class="input-group-addon" for="">发布时间:</label>
                        	<input class="form-control" type="text" id="addtime" name="addtime" value="{{addtime}}" style="width: 400px;" readonly>
                    	</div>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary"><i class="fa fa-filter"></i> 搜 索</button>
                        <a href="{{ url.get('bpinteract/add', ['id': id]) }}" class="btn btn-primary"><i class="fa fa-plus fa-lg"></i> 添加美粒互动</a>
                    </div>
                </form>
            </div>

        </div>
<div class="container-fluid" id="content_box_blank">
    <div class="row">
        <div class="col-xs-12">
            <ol class="breadcrumb">
                <li>美容院管理</li>
                <li class="active">美粒互动列表</li>
            </ol>
            <table class="table table-hover">
                <thead>
                <tr>
                    <th style="width: 60px;">ID</th>
                    <th style="width: 60px;">用户</th>
                    <th>内容</th>
                    <th style="width: 60px;">状态</th>
                    <th style="width: 180px;">发布时间</th>                  
                    <th style="width: 100px;"></th>
                </tr>
                </thead>
                {% for d in interactList %}
                <tr>
                    <td>{{ d.id }}</td>
                    <td>{{ d.user_nickname}}</td>
                    <td>{{ d.content|e }}
                    	<div class="question_photos_box">
                        {% for pic in json_decode(d.pics) %}
                            <div class="pic_list">
                                <a href="{{ PicUrlBPCover(pic, this.getDi()) }}" class="thumbnail" target="_blank">
                                    <img src="{{ PicUrlBPCover(pic, this.getDi()) }}@!120" alt="" />
                                </a>
                            </div>
                        {% endfor %}
                        </div>
                    </td>
                    <td>
                    	{% if d.state == 1 %}
                    	正常
                    	{% endif %}
                    	{% if d.state == -1 %}
                    	删除
                    	{% endif %}
                    </td>
                    <td>{{ d.addtime }}</td>
                    <td>
                        <div class="dropdown">
                            <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu{{ d.service_id }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><i class="fa fa-cogs"></i> 操作 <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="dropdownMenu{{ d.service_id }}">
                                {% if d.state == 1 %}
                                <li><a href="javascript:void(0)" did="{{ d.id }}" dstate="-1" class="set_state" durl="{{ url.get('bpinteract/setState') }}"><i class="fa fa-paper-plane-o fa-fw"></i> 删除</a></li>
                                {% endif %}
                            </ul>
                        </div>
                    </td>
                </tr>
                {% endfor %}
            </table>
        </div>
    </div>
    {{ this.tagNav.page(
        page,
        total,
        limit,
        url.get('bpinteract/list', [
        'content': content,
        'addtime':addtime,
        'id':id,
        'page': '__PAGE__'
        ]
        )) }}
</div>
{% endblock %}